import { createApp } from 'vue'
// import managerInfo from '@/store/managerInfo'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import './style.css'
import App from './App.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// import emitter from '@/utils/eventBus'

// 加载路由
import router from './config/routes'
import pinia from '@/store/index'


const apps = createApp(App);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    apps.component(key, component)
}

// 事件总线

// apps.provide('eventBus', createApp({}))

apps.use(pinia)
    .use(ElementPlus, { locale: zhCn })
    .use(router)
    // .use(Token)
    .mount('#app')

// apps.config.globalProperties.eventBus = emitter
